package EX02_Answer;

import java.util.Scanner;

public class EX02_AccountService implements EX02_IAccountService{
	private static EX02_IAccountDAO as = null;
	
public EX02_AccountService() {
as = new EX02_AccountDAO();
}		
	
	@Override
	public void createAccount() {
		Scanner sc = new Scanner(System.in);
		EX02_AccountVO avo = new EX02_AccountVO();
		System.out.println("계좌를 생성하기 위한 기본 정보를 입력하세요");
		System.out.println("계좌 번호를 입력하세요");
		avo.setAid(sc.next());
		System.out.println("계좌 잔액을 입력하세요");
		avo.setBalance(sc.next());
		System.out.println("계좌 이자율을 입력하세요");
		avo.setInterestRate(sc.next());
		if(as.insertAccount(avo))
			System.out.println("계좌 생성 완료!");
		else
			System.out.println("Warning! 계좌 생성 실패!");
	}

	@Override
	public void readAccount() {
		
	}

	@Override
	public void modifyAccount() {
		
	}

	@Override
	public void removeAccount() {
		
	}

	@Override
	public float getMonthlyInterestRate() {
		return 0;
	}

	@Override
	public void withdraw() {
		
	}

	@Override
	public void deposit() {
		
	}

}
